﻿using MySql.Data.MySqlClient;
using Oracle.ManagedDataAccess.Client;

namespace Himp.Platform.OceanBase
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // 替换为你的实际连接字符串
            string connectionString = "Server=obmtm4k5pntoa1r0-mi.cn-hangzhou.oceanbase.aliyuncs.com;Database=main;Uid=ocean;Pwd=NxbQmezDQEcq37kbcJImioeD;";

            try
            {
                using (var connection = new MySqlConnection(connectionString))
                {
                    connection.Open();
                    Console.WriteLine("Connection successful!");
                    //进行数据库操作
                    connection.Close();
                }
            }
            catch (MySqlException ex)
            {
                Console.WriteLine($"MySQL error occurred: {ex.Message}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"An error occurred: {ex.Message}");
            }
        }
    }
}
